﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;

namespace ProdeBackEnd.Model
{
    [DataContract(Namespace = "ProdeBackEnd.Model")]
    public class Tournament
    {
        [DataMember]
        private long id;

        [DataMember]
        private String name;

        [DataMember]
        private DateTime start;

        [DataMember]
        private DateTime end;

        [DataMember]
        private List<Team> teams;

        public Tournament(String name, DateTime start, DateTime end)
        {
            this.name = name;
            this.start = start;
            this.end = end;
        }

        public Tournament(long id, String name, DateTime start, DateTime end)
        {
            this.id = id;
            this.name = name;
            this.start = start;
            this.end = end;
        }

        public long getId()
        {
            return this.id;
        }

        public String getName()
        {
            return this.name;
        }

        public DateTime getStart()
        {
            return this.start;
        }

        public DateTime getEnd()
        {
            return this.end;
        }

        public List<Team> getTeams()
        {
            return this.teams;
        }

        public void setId(long id)
        {
            this.id = id;
        }

        public void setName(String name)
        {
            this.name = name;
        }

        public void setStart(DateTime start)
        {
            this.start = start;
        }

        public void setEnd(DateTime end)
        {
            this.end = end;
        }

        public void setTeams(List<Team> teams)
        {
            this.teams = teams;
        }

        public void addTeam(Team team)
        {
            this.teams.Add(team);
        }
    }
}